#pragma once

#include <Windows.h>

class CSGD_Direct3D;
class CSGD_DirectInput;
class CSGD_TextureManager;
class CSGD_XAudio2;

class IGameState;

class CGame
{
public:

	static CGame* GetInstance		( void );
	static void	  DeleteInstance	( void );

	void Initialize( HWND hWnd, HINSTANCE hInstance,
					 int nScreenWidth, int nScreenHeight,
					 bool bWindowed );

	bool Main( void );

	void Shutdown( void );

	void ChangeState( IGameState* pNewState );

	int		GetScreenWidth	( void ) const { return m_nScreenWidth;  }
	int		GetScreenHeight ( void ) const { return m_nScreenHeight; }
	bool	IsWindowed		( void ) const { return m_bWindowed;	 }

private:

	static CGame* s_Instance;

	CGame(void);
	~CGame(void);

	CGame( const CGame& );
	CGame& operator= ( const CGame& );

	int		m_nScreenWidth;
	int		m_nScreenHeight;
	bool	m_bWindowed;

	IGameState*		m_pCurrState;

	unsigned long	m_ulCurrTime;

	bool			Input	( void );
	void			Update	( void );
	void			Render	( void );
};

